package com.wondream.myframework.app.common.util;

import org.apache.commons.lang3.StringUtils;

public class StrUtils {
    public static String firstLetter2UpperCase(String fieldName) {
        if (StringUtils.isBlank(fieldName)) {
            return fieldName;
        }
        String result = fieldName.substring(0, 1).toUpperCase();
        return result.concat(fieldName.substring(1));
    }

    public static void main(String[] args) {
        System.out.println(firstLetter2UpperCase(null));
        System.out.println(firstLetter2UpperCase(""));
        System.out.println(firstLetter2UpperCase("a"));
        System.out.println(firstLetter2UpperCase("ab"));
    }
}
